#ifndef _BARTER_SERVER_CONFIG_H_
#define _BARTER_SERVER_CONFIG_H_

#include <string>
#include <vector>
#include <map>

typedef void(*ConfigCallback)(std::string, std::string, void*);

struct HookEntry
{
	std::string Entry;
	ConfigCallback Callback;
	void* CallbackData;
};
struct ConfigPair
{
	std::string Key;
	std::string Value;
};
struct IteratePair
{
	std::map<std::string, ConfigPair> Begin;
	std::map<std::string, ConfigPair> End;
};

class Config
{
private:
	std::map<std::string, ConfigPair> Values;
	Config();
	Config(const Config&);
	Config& operator=(const Config&);
public:
	static Config& Instance();
	bool ParseConfigFile(std::string);
	std::string GetValue(std::string, std::string = "");
};

#define conf Config::Instance()

#endif // _BARTER_SERVER_CONFIG_H_
